VERSION = $(shell perl get_version.pl)
TARGET = melontakirja-$(VERSION).oxt
SOURCE = $(subst %.oxt,%.zip,$(TARGET))
PLATFORMSTRING = $(_OS:l)_$(_ARCH:l)

.PHONY : zip-file-list

extension: $(TARGET)

%.oxt : %.zip
	mv $< $@
	echo "$(PLATFORMSTRING) is done"

$(TARGET): zip-file-list
	perl create_manifest.pl > files/META-INF/manifest.xml
	cd files; zip ../$(TARGET)   $(shell cat zip-inc-list)

zip-file-list:
	find files -type f |grep -v .svn |sort > zip-inc-list 
	perl -pi -e 's|files/||' zip-inc-list
